Previous Book Contents Book Index Next

Inside Macintosh: QuickDraw GX Objects /
Chapter 8 - Tag Objects / Tag Objects Reference
Functions / Directly Manipulating the Data in a Tag Object


GXLockTag

You can use the GXLockTag function to load a tag object into QuickDraw GX memory and lock its contents into a fixed memory location.

void GXLockTag(gxTag target);
target
A reference to the tag object to be loaded and locked.
DESCRIPTION
The GXLockTag function prevents a tag object from being relocated. To directly edit a tag's contents, you must first call GXLockTag. You can then call GXGetTagStructure and edit the tag's contents. After editing, you must call GXUnlockTag to release the tag for relocation.

SPECIAL CONSIDERATIONS
To avoid fragmenting the QuickDraw GX heap, you should call the GXUnlockTag function as soon as possible after calling GXLockTag.

You can nest calls to these direct-access routines, but be sure to call GXUnlockTag as many times as you call GXLockTag. Version 1.0 of QuickDraw GX prohibits more than 255 nested calls to GXLockTag.

ERRORS, WARNINGS, AND NOTICES
Errors 
out_of_memory 
tag_is_nil 
SEE ALSO
The GXUnlockTag function is described in the next section. The GXGetTagStructure function is described on page 8-23.


Previous Book Contents Book Index Next

© Apple Computer, Inc.
7 JUL 1996